retrieve a header from a file in c